home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-12 | 5.2 KB | 230 lines | [TEXT/MPS ] |
- ;
- ; File: StandardFile.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Built by: anonymous
- ; From: StandardFile.i, revision 2, dated 2/25/94
- ; With Interfacer: 1.1d4e2
- ;
- ; Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- ; List the version information from above in Problem Description.
- ;
- ;
-
- IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
- __STANDARDFILE__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
- ; include 'MixedMode.a' ;
- ; include 'Traps.a' ;
- ENDIF
- IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
-
- IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
- include 'Dialogs.a'
- ENDIF
- ; include 'Windows.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'IntlResources.a' ;
- ; include 'Events.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Controls.a' ;
- ; include 'Menus.a' ;
- ; include 'TextEdit.a' ;
- ENDIF
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
-
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- ; include 'SegLoad.a' ;
- ENDIF
-
- ; resource IDs and item offsets of pre-7.0 dialogs
- putDlgID EQU -3999
- putSave EQU 1
- putCancel EQU 2
- putEject EQU 5
- putDrive EQU 6
- putName EQU 7
- getDlgID EQU -4000
- getOpen EQU 1
- getCancel EQU 3
- getEject EQU 5
- getDrive EQU 6
- getNmList EQU 7
- getScroll EQU 8
- ; resource IDs and item offsets of 7.0 dialogs
- sfPutDialogID EQU -6043
- sfGetDialogID EQU -6042
- sfItemOpenButton EQU 1
- sfItemCancelButton EQU 2
- sfItemBalloonHelp EQU 3
- sfItemVolumeUser EQU 4
- sfItemEjectButton EQU 5
-
- sfItemDesktopButton EQU 6
- sfItemFileListUser EQU 7
- sfItemPopUpMenuUser EQU 8
- sfItemDividerLinePict EQU 9
- sfItemFileNameTextEdit EQU 10
- sfItemPromptStaticText EQU 11
- sfItemNewFolderUser EQU 12
- ; pseudo-item hits for use in DlgHook
- sfHookFirstCall EQU -1
- sfHookCharOffset EQU $1000;
- sfHookNullEvent EQU 100
- sfHookRebuildList EQU 101
- sfHookFolderPopUp EQU 102
- sfHookOpenFolder EQU 103
- ; the following are only in system 7.0+
- sfHookOpenAlias EQU 104
- sfHookGoToDesktop EQU 105
- sfHookGoToAliasTarget EQU 106
- sfHookGoToParent EQU 107
- sfHookGoToNextDrive EQU 108
- sfHookGoToPrevDrive EQU 109
- sfHookChangeSelection EQU 110
-
- sfHookSetActiveOffset EQU 200
- sfHookLastCall EQU -2
-
- ; the refcon field of the dialog record during a
- ; modalfilter or dialoghook contains one of the following
-
- sfMainDialogRefCon: SET 'stdf'
- sfNewFolderDialogRefCon: SET 'nfdr'
- sfReplaceDialogRefCon: SET 'rplc'
- sfStatWarnDialogRefCon: SET 'stat'
- sfLockWarnDialogRefCon: SET 'lock'
- sfErrorDialogRefCon: SET 'err '
- SFReply RECORD 0
- good ds.b 1
- copy ds.b 1
- fType ds.l 1
- vRefNum ds.w 1
- version ds.w 1
- fName ds.l 16
- Size EQU *
- ENDR
-
- StandardFileReply RECORD 0
- sfGood ds.b 1
- sfReplacing ds.b 1
- sfType ds.l 1
- sfFile ds FSSpec
- sfScript ds.w 1
- sfFlags ds.w 1
- sfIsFolder ds.b 1
- sfIsVolume ds.b 1
- sfReserved1 ds.l 1
- sfReserved2 ds.w 1
- Size EQU *
- ENDR
-
- ; the following also include an extra parameter of "your data pointer"
-
- IF &TYPE('__cplusplus') = 'DEFINED' THEN
- ENDIF
- Macro
- _SFPutFile
- dc.w $3F3C
- dc.w $0001
- dc.w $A9EA
- EndM
-
- Macro
- _SFGetFile
- dc.w $3F3C
- dc.w $0002
- dc.w $A9EA
- EndM
-
- Macro
- _SFPPutFile
- dc.w $3F3C
- dc.w $0003
- dc.w $A9EA
- EndM
-
- Macro
- _SFPGetFile
- dc.w $3F3C
- dc.w $0004
- dc.w $A9EA
- EndM
-
- Macro
- _StandardPutFile
- dc.w $3F3C
- dc.w $0005
- dc.w $A9EA
- EndM
-
- Macro
- _StandardGetFile
- dc.w $3F3C
- dc.w $0006
- dc.w $A9EA
- EndM
-
- Macro
- _CustomPutFile
- dc.w $3F3C
- dc.w $0007
- dc.w $A9EA
- EndM
-
- Macro
- _CustomGetFile
- dc.w $3F3C
- dc.w $0008
- dc.w $A9EA
- EndM
-
- ; StandardOpenDialog uses the 'open' resource ID=128 in your application for the type list
-
- ; It runs on all versions of sytem software since System 4.2
-
- ;
- ;
- ; New StandardFile routine comments:
- ;
- ; activeList is pointer to array of integer (16-bits).
- ; first integer is length of list.
- ; following integers are possible activatable DITL items, in
- ; the order that the tab key will cycle through. The first
- ; in the list is the item made active when dialog is first shown.
- ;
- ; activateProc is a pointer to a procedure like:
- ;
- ; PROCEDURE MyActivateProc(theDialog: DialogPtr;
- ; itemNo: INTEGER;
- ; activating: BOOLEAN;
- ; yourDataPtr: Ptr);
- ;
- ; The activateProc is called with activating=FALSE on the itemNo
- ; about to deactivate then with activating=TRUE on the itemNo
- ; about to become the active item. (like activate event)
- ;
- ; yourDataPtr is a nice little extra that makes life easier without
- ; globals. CustomGetFile & CustomPPutFile when calling any of their
- ; call back procedures, pushes the extra parameter of yourDataPtr on
- ; the stack.
- ;
- ; In addition the filterProc in CustomGetFile & CustomPPutFile is called
- ; before before SF does any mapping, instead of after.
- ;
-
- IF &TYPE('__cplusplus') = 'DEFINED' THEN
- ENDIF
- ENDIF ; __STANDARDFILE__
-